package com.huluobo.a2112mvvmdouyindemo.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.a2112mvvmdouyindemo.R;
import com.huluobo.a2112mvvmdouyindemo.utils.ImageLoader;
import com.huluobo.mvvm_base.bean.VideoBeanResult;

import java.util.List;

/**
 * Created by LC on 2024/4/10.
 */
public class CollectAdapter extends BaseQuickAdapter<VideoBeanResult.VideoBean, BaseViewHolder> {
    public CollectAdapter(@Nullable List<VideoBeanResult.VideoBean> data) {
        super(R.layout.item_collect, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, VideoBeanResult.VideoBean videoBean) {
        ImageLoader.getInstance().loadImage(getContext(), videoBean.getVideomainimg(),
                baseViewHolder.getView(R.id.item_collect_video_iv));
        baseViewHolder.setText(R.id.item_collect_desc_tv, videoBean.getCaption());
    }
}
